package edu.osu.intelligentagents.common;

import java.util.Vector;

public class State {
	protected int id;
	protected String name;
	protected float reward;
	protected Vector<Float> values;
	public Object object;
	public boolean occupied;
	public boolean parked;

	public State() {
		values = new Vector<>();
	}

	public State(int id, String name) {
		values = new Vector<>();
		this.id = id;
		this.name = name;
	}

	public State(int id, String name, float reward) {
		values = new Vector<>();
		this.id = id;
		this.name = name;
		setReward(reward);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public float getReward() {
		return reward;
	}

	public void setReward(float reward) {
		this.reward = reward;
		if (values.size() > 0)
			values.remove(0);
		values.add(0, reward);
	}

	public Vector<Float> getValues() {
		return values;
	}

	public void setValues(Vector<Float> values) {
		this.values = values;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "index:" + id + "(" + getName() + " o=" + occupied + " p="
				+ parked + ")";

		// return "index:" + id + ", " + getName() + ", o=" + occupied + ", p="
		// + parked + ", reward:" + reward + " ";
	}
}
